package com.java.design.policy.model;

import com.java.design.policy.model.interfaces.impl.BowAndArrowBehavior;
import com.java.design.policy.model.interfaces.impl.KnifeBehavior;
import com.java.design.policy.model.interfaces.impl.SwordBehavior;
import com.java.design.policy.model.roles.King;
import com.java.design.policy.model.abstracts.Character;
import com.java.design.policy.model.roles.Knight;

/**
 * @author Tony
 */
public class PolicyMain {

    public static void main(String[] args) {

        Character character = new King();
        character.setWeaponBehavior(new BowAndArrowBehavior());
        character.fight();

        Character knight = new Knight();
        knight.setWeaponBehavior(new KnifeBehavior());
        knight.fight();

        knight.setWeaponBehavior(new SwordBehavior());
        knight.fight();

    }

}
